/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __INTERFACE_I_STRING__
#define __INTERFACE_I_STRING__


/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos_box
{
    // 
    // wstring obj
    // 
    class i_wstring : public xos::i_release
    {
    protected:
        virtual ~i_wstring(){}

    public:
        virtual const wchar_t * get( wchar_t * lpszStr, size_t tSize ) const = 0;
        virtual i_wstring * get( i_wstring * pString ) = 0;
        virtual size_t length() const = 0;

        virtual i_wstring * set( const wchar_t * lpszStr, size_t tLen ) = 0;
        virtual i_wstring * set( const wchar_t * lpszStr ) = 0;
        virtual i_wstring * set( const i_wstring * pString ) = 0;

        virtual i_wstring * append( const i_wstring * pString, const wchar_t seperator ) = 0;
        virtual i_wstring * append( const wchar_t * lpszStr, size_t tLen, const wchar_t seperator ) = 0;
        virtual i_wstring * append( const wchar_t * lpszStr, const wchar_t seperator ) = 0;

        virtual i_wstring * append( const i_wstring * pString ) = 0;
        virtual i_wstring * append( const wchar_t * lpszStr ) = 0;

        virtual i_wstring * url_append( const i_wstring * pString ) = 0;
        virtual i_wstring * url_append( const wchar_t * lpszStr, size_t tLen ) = 0;
        virtual i_wstring * url_append( const wchar_t * lpszStr ) = 0;

    };

    // 
    // string obj
    // 
    class i_string : public xos::i_release
    {
    protected:
        virtual ~i_string(){}

    public:
        virtual const char * get( char* lpszStr, size_t tSize ) const = 0;
        virtual i_string * get( i_string* pString ) = 0;
        virtual size_t length() const = 0;

        virtual i_string * set( const char* lpszStr, size_t tLen ) = 0;
        virtual i_string * set( const char* lpszStr ) = 0;
        virtual i_string * set( const i_string* pString ) = 0;

        virtual i_string * append(const i_string* pString, const char seperator) = 0;
        virtual i_string * append( const char * lpszStr, size_t tLen, const char seperator ) = 0;
        virtual i_string * append(const char* lpszStr, const char seperator) = 0;

        virtual i_string * append( const i_string* pString ) = 0;
        virtual i_string * append( const char* lpszStr ) = 0;

        virtual i_string * url_append( const i_string * pString ) = 0;
        virtual i_string * url_append( const char * lpszStr, size_t tLen ) = 0;
        virtual i_string * url_append( const char * lpszStr ) = 0;

    };
}

#endif // __INTERFACE_I_STRING__
